package org.eiahe.hr.salary.domain.bo;

import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.core.xss.Xss;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.salary.domain.HousingFundPayment;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 公积金缴纳业务对象 hr_salary_housing_fund
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HousingFundPayment.class, reverseConvertGenerate = false)
public class HousingFundPaymentBo extends BaseEntity {

    /**
     * 公积金缴纳ID
     */
    @NotNull(message = "公积金缴纳ID不能为空", groups = { EditGroup.class })
    private Long paymentId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 工号
     */
    @NotBlank(message = "工号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String employeeNo;

    /**
     * 员工姓名
     */
    @NotBlank(message = "员工姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String employeeName;

    @ExcelProperty(value = "身份证号")
    private String idCard;

    private String department;

    private String departmentName;

    /**
     * 基础金额
     */
    private BigDecimal baseAmount;

    /**
     * 年月(yyyyMM格式)
     */
    @NotBlank(message = "年月不能为空", groups = { AddGroup.class, EditGroup.class })
    private String yearMonth;

    /**
     * 个人缴纳额
     */
    private BigDecimal personalAmount;

    /**
     * 公司缴纳额
     */
    private BigDecimal companyAmount;

    /**
     * 缴纳基数
     */
    private BigDecimal paymentBase;

    /**
     * 个人缴纳比例
     */
    private BigDecimal personalRate;

    /**
     * 公司缴纳比例
     */
    private BigDecimal companyRate;

    /**
     * 缴纳状态(0未缴纳 1已缴纳)
     */
    private String paymentStatus;

    /**
     * 缴纳时间
     */
    private Date paymentTime;

    /**
     * 备注
     */
    @Xss(message = "备注不能包含脚本字符")
    private String remark;
}